package study.lagou.com.mapper;

import org.apache.ibatis.annotations.Select;
import study.lagou.com.pojo.Role;

import java.util.List;

public interface IRoleMapper {

    /**
     * 通过用户ID查询角色信息
     * @param userId
     * @return
     */
    @Select("select b.* from sys_user_role a,sys_role b where a.roleid = b.id and a.userid = #{userId}")
    public List<Role> listRoleByUserId(String userId);
}
